//
//  RepairButtonCell.m
//  Project6
//
//  Created by ToanDK on 11/23/12.
//  Copyright (c) 2012 DungNP. All rights reserved.
//

#import "RepairButtonCell.h"

@implementation RepairButtonCell
@synthesize  addPhotoButton;
@synthesize  completeButton;

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
    }
    return self;
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];
    
    // Configure the view for the selected state
}

-(void)drawRect:(CGRect)rect{
    [super drawRect:rect];
    [self.contentView setBackgroundColor:[UIColor clearColor]];
    [self setBackgroundView:nil];
    [self setBackgroundColor:[UIColor clearColor]];
    
    UIImage* buttonImage =[[UIImage imageNamed:@"greenButton"] stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0];
    UIImage* buttonImageON =[[UIImage imageNamed:@"greenButtonOn"] stretchableImageWithLeftCapWidth:10.0 topCapHeight:0.0];
    
    [addPhotoButton setBackgroundImage:buttonImage forState:UIControlStateNormal];
    [addPhotoButton setBackgroundImage:buttonImageON forState:UIControlStateHighlighted];
    [addPhotoButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [addPhotoButton setTitleColor:[UIColor grayColor] forState:UIControlStateHighlighted];
    
    [completeButton setBackgroundImage:buttonImage forState:UIControlStateNormal];
    [completeButton setBackgroundImage:buttonImageON forState:UIControlStateHighlighted];
    [completeButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
    [completeButton setTitleColor:[UIColor grayColor] forState:UIControlStateHighlighted];
    
}


@end
